Repository navigation
merge: sync upstream 82a3318 (v0.6.5) - #32
Merged
Merged
Conversation
A disabled control is skipped by hit testing, so a right click on one never reached the application. A toolbar button the user can hide or move still needs its context menu, and the application had to hit-test its own geometry to find it. Add HitOptions.SecondaryWhenDisabled: a disabled control that declares it becomes the target of a secondary press only. Primary presses, keys and activation still pass over it. The router resolves the hover for a secondary press with the new flag, so the press target and the application's PointerDown delivery both see the control. Plain PointerAt callers pass false and keep the old hit rules. Used by motty#940 for the SFTP toolbar and the dock tools.
The generated AGENTS.md is the only document tools/aieval sends, and the skill is what an external agent installs. Both were long undivided prose with copy-paste mistakes. - add a task index, an error-to-fix table and a headless check list to the generated guide, and split the duplicated sections - rewrite the skill as a task router with a verification loop - split the 9k-character declarative-layout paragraph (en and zh), add a tested table example, and install recipes.md with the skill - add go tests for symbols, links, quoted panics and eval-task coverage
EnsureClosed only moved the program image aside. Native files the program loads at runtime, such as conpty.dll, stayed locked and File failed on them: a GUI install showed "cannot open file for writing" and a silent install skipped the file without updating it. Apply the same delete-then-rename-aside treatment before each extra file, clean the moved copies on the next install, and mark locked extra files for reboot removal when uninstalling.
The default Linux build runs on X11, where SetTitle returned ErrUnsupported; only the opt-in GTK shell applied titles. The X11 window now applies them on its event loop, as SetSize does: SetTitle stores the latest title and posts a command, and the loop writes WM_NAME and _NET_WM_NAME. An empty title clears both. Titles are checked in app.Window.SetTitle before any backend sees them. A title with a NUL byte or invalid UTF-8 returns an error and changes nothing. Windows used to accept such a title and drop it silently, and Darwin truncated or emptied it, so the backends now agree. This follows vivaui#304, which landed as 68f1a05 and added SetTitle without the X11 path or the title checks. Tests cover the X11 command path with a fake xcb API, the headless windows listing with rejected titles and a closed window, and a Windows read-back through GetWindowTextW. The docs table gets a window title row.
An application menu runs its entry outside the window's event handlers, so the focus, clipboard and repaint a command returns were dropped: choosing Find from the menu bar opened the bar while the keyboard stayed in the terminal. MenuBarItem.OnSelect now returns the gfx.EventResult a key handler returns, and the runtime applies it to the window that last became active and wakes the window for the frame that shows it. The application keeps producing results; applying focus and scheduling the repaint stay in the runtime, so Motty's menu actions only return what their commands did. The companion motty commit uses this for Find, the command palette, the assistant, the host panel, the local terminal and tab switching.
A menu's key equivalent reached its entry directly, so a command that depends on the focused control ran the wrong branch: Edit > Copy in Motty's assistant panel copied the terminal selection and ignored a selection in an assistant answer, because the shortcut handler never saw Cmd+C. Offer a menu entry's chord to the window first, as AppKit offers a key to the focused content before the menu: a character chord to the shortcut handler, a named key to the key handler, both with the focused control as the target. OnSelect runs only when that handler declines, so pressing a shortcut and choosing its entry run one command. The routing stays in the application; the runtime only supplies the focused target and carries out what the handler returned.
Upstream now carries the fork's window title work (fork #1, #5 and #17 as 68f1a05, extended by 76aba78 with X11 titles and NUL/invalid UTF-8 rejection) and the Windows patch payload staging (fork c029d61 as 84a9897). Conflicts were resolved in upstream's favour: - app/title.go, app/title_test.go: upstream's version. - README.md, docs/conformance.md: upstream's text; the fork's SetTitle notes are dropped because upstream documents the same API. - cmd/viva/initfiles/AGENTS.md.txt: upstream's rewrite, keeping only the fork-only ScrollArea.Bars / PageConfig.BarStyle and Tooltip style notes.
xiaoyumuxi
added a commit
that referenced
this pull request
Nov 17, 2026
* docs(release): v0.6.5 notes * docs: point at v0.6.5 * feat(gfx): let a disabled control take secondary presses A disabled control is skipped by hit testing, so a right click on one never reached the application. A toolbar button the user can hide or move still needs its context menu, and the application had to hit-test its own geometry to find it. Add HitOptions.SecondaryWhenDisabled: a disabled control that declares it becomes the target of a secondary press only. Primary presses, keys and activation still pass over it. The router resolves the hover for a secondary press with the new flag, so the press target and the application's PointerDown delivery both see the control. Plain PointerAt callers pass false and keep the old hit rules. Used by motty#940 for the SFTP toolbar and the dock tools. * docs(agents): index the guide by task and guard it in tests The generated AGENTS.md is the only document tools/aieval sends, and the skill is what an external agent installs. Both were long undivided prose with copy-paste mistakes. - add a task index, an error-to-fix table and a headless check list to the generated guide, and split the duplicated sections - rewrite the skill as a task router with a verification loop - split the 9k-character declarative-layout paragraph (en and zh), add a tested table example, and install recipes.md with the skill - add go tests for symbols, links, quoted panics and eval-task coverage * fix(winpkg): replace loaded native files during install EnsureClosed only moved the program image aside. Native files the program loads at runtime, such as conpty.dll, stayed locked and File failed on them: a GUI install showed "cannot open file for writing" and a silent install skipped the file without updating it. Apply the same delete-then-rename-aside treatment before each extra file, clean the moved copies on the next install, and mark locked extra files for reboot removal when uninstalling. * fix(linux): restore read-only editor input before the first key * fix(update): stage a Windows patch payload before quitting * fix(linux): search XDG config dirs for Vulkan ICD manifests * feat(app): add window title support across native and headless backends * feat(app): set X11 window titles and reject unusable ones The default Linux build runs on X11, where SetTitle returned ErrUnsupported; only the opt-in GTK shell applied titles. The X11 window now applies them on its event loop, as SetSize does: SetTitle stores the latest title and posts a command, and the loop writes WM_NAME and _NET_WM_NAME. An empty title clears both. Titles are checked in app.Window.SetTitle before any backend sees them. A title with a NUL byte or invalid UTF-8 returns an error and changes nothing. Windows used to accept such a title and drop it silently, and Darwin truncated or emptied it, so the backends now agree. This follows vivaui#304, which landed as 68f1a05 and added SetTitle without the X11 path or the title checks. Tests cover the X11 command path with a fake xcb API, the headless windows listing with rejected titles and a closed window, and a Windows read-back through GetWindowTextW. The docs table gets a window title row. * feat(app): carry out menu action results on the active window An application menu runs its entry outside the window's event handlers, so the focus, clipboard and repaint a command returns were dropped: choosing Find from the menu bar opened the bar while the keyboard stayed in the terminal. MenuBarItem.OnSelect now returns the gfx.EventResult a key handler returns, and the runtime applies it to the window that last became active and wakes the window for the frame that shows it. The application keeps producing results; applying focus and scheduling the repaint stay in the runtime, so Motty's menu actions only return what their commands did. The companion motty commit uses this for Find, the command palette, the assistant, the host panel, the local terminal and tab switching. * fix(app): run menu shortcuts through the focused handler A menu's key equivalent reached its entry directly, so a command that depends on the focused control ran the wrong branch: Edit > Copy in Motty's assistant panel copied the terminal selection and ignored a selection in an assistant answer, because the shortcut handler never saw Cmd+C. Offer a menu entry's chord to the window first, as AppKit offers a key to the focused content before the menu: a character chord to the shortcut handler, a named key to the key handler, both with the focused control as the target. OnSelect runs only when that handler declines, so pressing a shortcut and choosing its entry run one command. The routing stays in the application; the runtime only supplies the focused target and carries out what the handler returned. --------- Co-authored-by: t8y2 <1156263951@qq.com> Co-authored-by: ccq <76206374+caichangqing1120@users.noreply.github.com> Co-authored-by: Lichenkang <2188718831@qq.com> Co-authored-by: Dean Cen <cen915544637@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merge upstream main
82a3318(v0.6.5) into fork main6553826. Merge this PR with a merge commit, never squash, so upstream stays an ancestor of fork main and every published Lithe pin stays reachable.Upstream range
d345275..82a3318, 12 commits:82a3318fix(app): run menu shortcuts through the focused handlercd1f298feat(app): carry out menu action results on the active window76aba78feat(app): set X11 window titles and reject unusable ones68f1a05feat(app): add window title support across native and headless backends (feat(app): update an open window title across native and headless backends vivaui/viva#304)cefdb9dfix(linux): search XDG config dirs for Vulkan ICD manifests (fix(linux): avoid Vulkan loader crash without an ICD vivaui/viva#333)84a9897fix(update): stage a Windows patch payload before quitting (fix(update): stage a Windows patch payload before quitting vivaui/viva#334)49bc0aefix(linux): restore read-only editor input before the first key (linux: restore native editor input after permission changes vivaui/viva#331)bd68f9efix(winpkg): replace loaded native files during install93ab37ddocs(agents): index the guide by task and guard it in testsf93eda3feat(gfx): let a disabled control take secondary presses3b4114fdocs: point at v0.6.59107119docs(release): v0.6.5 notesConflicts
All resolved in upstream's favour.
app/title.go,app/title_test.go(add/add): upstream's version.68f1a05is the fork's window title work (feat(app): Window.SetTitle changes a window's title after it opens #1, darwin: keep the traffic lights centered when the title changes #5, fix(windows): give wmSetTitle its own message number #17) as merged upstream, and76aba78extends it with X11 titles and rejects titles holding NUL or invalid UTF-8.README.md,docs/conformance.md: upstream's text. The fork'sWindow.SetTitlebullet and "Window titles" section are dropped because upstream documents the same API.cmd/viva/initfiles/AGENTS.md.txt: upstream's rewrite of the guide. Only the two fork-only notes are kept:ScrollArea.Bars/PageConfig.BarStyle(appended to upstream's scroll-area paragraph) and theTooltipstyle (auto-merged).Fork patches
Superseded by upstream (the merged files are byte-identical to upstream):
Window.SetTitle, darwin: keep the traffic lights centered when the title changes #5 traffic lights centered on title change, fix(windows): give wmSetTitle its own message number #17wmSetTitlemessage number: upstream68f1a05(feat(app): update an open window title across native and headless backends vivaui/viva#304) +76aba78.app/title*.go,headless/application.goand the darwin, Windows and GTK title files now match upstream.c029d61/aaf3285Windows patch payload staging: upstream84a9897(fix(update): stage a Windows patch payload before quitting vivaui/viva#334). The wholeupdate/directory anddocs/updating.mdnow match upstream.Still fork-only, each with an open upstream PR:
Config.OnFocusLost(app/app.go,app/painter.go): feat(app): report window keyboard focus loss vivaui/viva#303.04e87c9tree disclosure, scroll-bar geometry (Bars,PageConfig.BarStyle) and tooltip surface (gfx.TooltipStyle), plus thecmd/viva/templatescopies: feat(ui): expose tree disclosure, scrollbar geometry and tooltip surface hooks vivaui/viva#305.ui/list.godiffers from upstream by one comment line only.No new fork-only code in this merge.
Validation
On macOS 27 / arm64, Go 1.27.4, on
2895b97:gofmt -l $(git ls-files '*.go'): clean.go vet ./...: clean (only the existingdidModifyRange:deprecation warning from cgo).GOOS=windows GOARCH=amd64 go build ./...andGOOS=windows GOARCH=arm64 go build ./...: pass.GOOS=linux GOARCH=amd64 go vet ./update/ ./ui/ ./components/ ./app/: clean.go test ./...: everything passes except 14 packaging tests incmd/viva(the program was built for macOS 13.0 or later but [mac] min_system says 12.0). That is the local toolchain: the same 14 tests fail on upstream82a3318and on fork main6553826before this merge, as recorded in merge: sync upstream b17e605 (resumable update downloads) #29.git merge-base --is-ancestor upstream/main HEAD: true.v0.6.5(tag objectdf9e4a2, commit9107119) was missing from the fork and has been pushed; fork tags now matchgit ls-remote --tags --refs https://github.com/vivaui/viva.git.